x86: fix domain cleanup
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 27 Oct 2008 13:22:43 +0000 (13:22 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 27 Oct 2008 13:22:43 +0000 (13:22 +0000)
commit1cbcdec761a05af42411e5f775873770325da2c9
tree01df9df1881478a9505c7febe3e7d0a0631eadee
parent47fbce220aa977961e19396b1c40bef7508cb84e
x86: fix domain cleanup

The preemptable page type handling changes modified free_page_type()
behavior without adjusting the call site in relinquish_memory(): Any
type reference left pending when leaving hypercall handlers is
associated with a page reference, and when successful free_page_type()
decrements the type refcount - hence relinquish_memory() must now also
drop the page reference.

Also, the recursion avoidance during domain shutdown somehow (probably
by me when I merged the patch up to a newer snapshot) got screwed up:
The avoidance logic in mm.c should short circuit levels below the top
one currently being processed, rather than the top one itself.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/domain.c
xen/arch/x86/mm.c